package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.CustomerFeedbackSource;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * 用户反馈意见
 * Created by zhangjh on 2017/3/27.
 */
@Entity
@Table(name = "user_feedback")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class UserFeedback extends IDEntityMall {

    /**
     * 用户反馈来源
     */
    @Column(columnDefinition = "varchar(30) comment '用户反馈来源 ALL(\"全部\"),MERCHANT(\"商户后台\"),MALL(\"平台后台\"), WEBSITE(\"官网\")'")
    @Enumerated(EnumType.STRING)
    private CustomerFeedbackSource source;


    /**
     * 提交账号
     */
    @Column(columnDefinition = "varchar(50)  comment '提交账号'")
    private String operatorAccount;


    /**
     * 反馈页面
     */
    @Column(columnDefinition = "varchar(100)  comment '反馈页面'")
    private String feedbackWebsite;


    /**
     * 反馈页面链接
     */
    @Column(columnDefinition = "varchar(100)  comment '反馈页面链接'")
    private String feedbackWebsiteUrl;

    /**
     * 反馈内容
     */
    @Column(columnDefinition = "text  comment '反馈内容'")
    private String feedbackContent;

    /**
     * 附件
     */
    @Column(columnDefinition = "varchar(255)  comment '附件'")
    private String annexeUrl;

    public CustomerFeedbackSource getSource() {
        return source;
    }

    public void setSource(CustomerFeedbackSource source) {
        this.source = source;
    }

    public String getOperatorAccount() {
        return operatorAccount;
    }

    public void setOperatorAccount(String operatorAccount) {
        this.operatorAccount = operatorAccount;
    }

    public String getFeedbackWebsite() {
        return feedbackWebsite;
    }

    public void setFeedbackWebsite(String feedbackWebsite) {
        this.feedbackWebsite = feedbackWebsite;
    }

    public String getFeedbackWebsiteUrl() {
        return feedbackWebsiteUrl;
    }

    public void setFeedbackWebsiteUrl(String feedbackWebsiteUrl) {
        this.feedbackWebsiteUrl = feedbackWebsiteUrl;
    }

    public String getAnnexeUrl() {
        return annexeUrl;
    }

    public void setAnnexeUrl(String annexeUrl) {
        this.annexeUrl = annexeUrl;
    }

    public String getFeedbackContent() {
        return feedbackContent;
    }

    public void setFeedbackContent(String feedbackContent) {
        this.feedbackContent = feedbackContent;
    }

    @Override
    public String toString() {
        return "UserFeedback{" +
                "source=" + source +
                ", operatorAccount='" + operatorAccount + '\'' +
                ", feedbackWebsite='" + feedbackWebsite + '\'' +
                ", feedbackWebsiteUrl='" + feedbackWebsiteUrl + '\'' +
                ", feedbackContent='" + feedbackContent + '\'' +
                ", annexeUrl='" + annexeUrl + '\'' +
                '}';
    }
}
